package com.cc.visitor.entity;

import com.cc.visitor.config.InsertListenerUserWeixin;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author chanchaw
 * @create 2024-09-17 17:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(value = "user_weixin", onInsert = InsertListenerUserWeixin.class)
public class UserWeixin implements Serializable{
    private static final long serialVersionUID = 1L;
    @Id(keyType = KeyType.Auto)
    private Integer id;
    private String openId;
    private String miniId;
    private String unionId;
    private Integer type;
    private String nickName;
    private String realName;
    private String company;
    private String insertType;
    private String remark;
    private Float seq;
    private Integer state;
    private String qrScene;
    private LocalDateTime subscribeTime;
    private String gender;
    private String wechatId;
    private String avatar;
    private LocalDateTime lastTime;
    private String lastUser;
    private String department;
    private String position;
    private Integer isDelete;
    private LocalDateTime cancelTime;
    private String phone;
    private String idNumber;
    private LocalDateTime createTime;
    private Integer register;
    private String visitorCategory;// 访客类型：供应商/物流/客户/政府机关/个人/其他
    private String sysRemark;
    private Integer dev;
    private Integer me;

    // 数据表中不存在的字段
    @Column(ignore = true)
    private String userType;
    @Column(ignore = true)
    private String invalid;
}
